<!DOCTYPE html>
<html>
<head>
		<meta charset="UTF-8">
		<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
		<meta content="yes" name="apple-mobile-web-app-capable">
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta content="telephone=no" name="format-detection">
		<meta content="email=no" name="format-detection">
		<title>下载页</title>
		<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="wrapper download" onclick="downSth();">
	<label class="download-cont">
		<img id="img" src="download1.png"/>
	</label>
	<div class="pop" id="popDiv">
		<img src="pop.png"/>
	</div>
</div>
<script type="text/javascript">
	function resizeImg(){
		var h=document.body.clientHeight;
		var w=document.body.clientWidth;
		document.getElementById("img").style.maxWidth=w+"px";
		document.getElementById("img").style.maxHeight=h+"px";
	}resizeImg();
	
	function downSth(){
		var tua = window.navigator.userAgent.toLowerCase();
		if(tua.match(/MicroMessenger/i) == 'micromessenger'){
			document.getElementById("popDiv").style.display = "block";
		}else{
			var ua = window.navigator.userAgent;
			var isiPad = ua.match(/iPad/i) != null;
			var isiPhone = ua.match(/iPhone/i) != null;
			var isandroid = ua.match(/Android/i) != null;
			if(isiPad || isiPhone){
				window.location = "itms-services:///?action=download-manifest&url=http://git.oschina.net/rogerrjy/yhMobile/raw/master/yhb2b_prd.plist";
			}
			else if(isandroid){
				window.location = "app-Guanwang-v1.5-20170105-release_15_jiagu_sign.apk";
			}
			else{
				alert(tua);
				//window.location = "app-Guanwang-v1.5-20170105-release_15_jiagu_sign.apk";
			}
		}
	}
	
	window.onload =  function(){
		downSth();
	}
</script>
</body>
</html>